Moving pictures have an enormous amount of information, and efficient compression coding is essential for recording and transmitting them. Video compression coding employs various elemental techniques. One of the elemental techniques is inter-frame prediction coding.
According to the inter-frame prediction coding technique, a picture (called a predicted picture) which approximates a picture to be currently coded (called a picture to be predicted) is generated using another coded picture (called a reference picture). A difference signal (called a prediction error picture) from the predicted picture is coded instead of an original picture signal.
A motion generally exists between frames, so it is popular to use a motion-compensated prediction coding technique to increase prediction efficiency using spatial displacement information. In general, moving pictures are highly correlated temporally and spatially, and can be compressed efficiently by motion-compensated prediction coding.
However, a high-accuracy predicted picture cannot be generated by only reflecting a spatial displacement when the signal amplitude varies over time, like a scene in which the illumination changes over time or a scene to which a fade effect (fade-in/fade-out) is applied as a kind of video special effect. A technique for increasing prediction efficiency in such a case is weighted prediction coding.
Weighted prediction coding is a technique of weighting the pixel value of a reference picture to generate a predicted picture in inter-frame prediction coding. A moving picture generally has a motion, and the weighted prediction coding technique is adopted in combination with the motion-compensated prediction coding technique. This combination will be called a weighted motion-compensated prediction coding technique.
The weighted motion-compensated prediction coding technique is employed as an international standard for a video coding scheme in reference 1 (H.264/MPEG-4 AVC: “Advanced Video Coding for Generic Audiovisual Services”, (Switzerland), ITU-T, March 2005, Series H: Audiovisual and multimedia systems H.264, pp. 157-159). This technique implements high compression ratios in a scene to which a fade effect is applied.
According to the weighted motion-compensated prediction coding technique, letting Pref be a reference picture, T be a motion from the reference picture Pref to a picture to be predicted, and E be a picture in which all pixel values are “1” at the same resolution as that of Pref, a predicted picture Ppred is generated by liner calculation of equation (1) using a pair of weight w and offset o (called a weighting factor):
[Mathematical 1]Ppred=wTPref+oE  (1)
Weighted prediction has a problem of how to calculate the weighting factor. For example, reference 2 (Japanese Patent Laid-Open No. 2005-217746 (p. 8, equation (11))) describes a method of calculating a weighting factor using equation (2). In equation (2), Psrc is i a picture to be predicted, Pref is a reference picture, and n is a pixel count. As characteristics closed in a picture P (intra-picture characteristics), S1(P) is the sum of pixel values, and S2(P) is the square sum of pixel values. Further, C(P0,P1) is the product sum of pixel values between two pictures.
                    [                  Mathematical          ⁢                                          ⁢          2                ]                                                                      w          =                                                    nC                ⁡                                  (                                                            P                      src                                        ,                                          P                      ref                                                        )                                            -                                                                    S                    1                                    ⁡                                      (                                          P                      src                                        )                                                  ⁢                                                      S                    1                                    ⁡                                      (                                          P                      ref                                        )                                                                                                                        nS                  2                                ⁡                                  (                                      P                    ref                                    )                                            -                                                                    S                    1                                    ⁡                                      (                                          P                      ref                                        )                                                  2                                                    ⁢                                  ⁢                  o          =                                                                      S                  1                                ⁡                                  (                                      P                    src                                    )                                            -                                                wS                  1                                ⁡                                  (                                      P                    ref                                    )                                                      n                                              (        2        )            
FIG. 3 is a block diagram showing an example of an apparatus (to be referred to as a conventional weighting factor calculation apparatus) which calculates a weighting factor using a conventional technique described in reference 2. In the example shown in FIG. 3, the conventional weighting factor calculation apparatus includes an intra-picture characteristic calculation means 101, frame buffer 102, inter-picture characteristic calculation means 103, and weighting factor calculation means 104.
The intra-picture characteristic calculation means 101 calculates intra-picture characteristics S1(Psrc) and S2(Psrc) in equation (2) using an input picture 1 (Psrc). The intra-picture characteristic calculation means 101 stores the calculated intra-picture characteristics in the frame buffer 102 in association with an input picture 2. The intra-picture characteristic calculation means 101 transfers the calculated characteristics to the weighting factor calculation means 104. The input picture 1 is a picture to be predicted in weighted prediction. The input picture 2 is a reference picture used in weighted prediction of the input picture 1 for a subsequently input picture to be predicted. The input picture 2 is, e.g., the input picture 1 itself or another picture. For example, picture coding may use a picture obtained by lossily coding the input picture 1.
For past input pictures, the frame buffer 102 accumulates one or a plurality of pairs each having the input picture 2 and intra-picture characteristics calculated by the intra-picture characteristic calculation means 101. The frame buffer 102 receives a reference picture selection signal, and outputs N pairs out of accumulated pairs of pictures and intra-picture characteristics in accordance with the reference picture selection signal. The frame buffer 102 transfers pictures out of the pairs of pictures and intra-picture characteristics to the inter-picture characteristic calculation means 103, and inter-picture characteristics to the weighting factor calculation means 104.
The inter-picture characteristic calculation means 103 calculates N inter-picture characteristics C(Psrc,Pref(1)), . . . , C(Psrc,Pref(N)) using N reference pictures (Pref(1), . . . , Pref(N)) transferred from the frame buffer 102 in accordance with Psrc and the reference picture selection signal. The inter-picture characteristic calculation means 103 transfers the N calculated inter-picture characteristics to the weighting factor calculation means 104.
The weighting factor calculation means 104 calculates N pairs of weighting factors (w(1),o(1)), . . . , (w(N),o(N)) corresponding to the N reference pictures based on equation (2) using the characteristics S1(Psrc), S1(Pref(1)), . . . , S1(Pref(N)), S2(Psrc), S2(Pref(1)), . . . , S2(Pref(N)), and C(Psrc,Pref(N)) transferred from the intra-picture characteristic calculation means 101, frame buffer 102, and inter-picture characteristic calculation means 103. The weighting factor calculation means 104 outputs the N pairs of calculated weighting factors for use in weighted prediction.
The conventional technique described in reference 2 has been explained.
Methods for calculating a weighting factor without using inter-picture characteristics are described in reference 3 (Jill M. Boyce, “WEIGHTED PREDICTION IN THE H.264/MPEG AVC VIDEO CODING STANDARD”, ISCAS '04, Proceedings of the 2004 International Symposium on Circuit and Systems, (USA), IEEE, May 23, 2004, Vol. 3, pp. 789-792, and reference 4 (Japanese Patent Laid-Open No. 2006-54802).
According to the method described in reference 3, a weighting factor is calculated using equation (3). In equation (3), M(P) is an index representing the DC component of a picture P. Typically, M(P) is an average pixel value and is equal to S1(P)/n.
According to a method described in reference 5 (Japanese Patent Laid-Open No. 2004-7379 (p. 31, equations (17) and (18)), a weighting factor is calculated using equation (4). In equation (4), V(P) is an index representing the DC component of a picture P. Typically, V(P) is the average of difference absolute values of pixels of the picture P with respect to M(P), or the root-mean-square of differences of pixels of the picture P with respect to M(P).
                    [                  Mathematical          ⁢                                          ⁢          3                ]                                                                      w          =                                    M              ⁡                              (                                  P                  src                                )                                                    M              ⁡                              (                                  P                  ref                                )                                                    ⁢                                  ⁢                  o          =          0                                    (        3        )                                [                  Mathematical          ⁢                                          ⁢          4                ]                                                                      w          =                                    V              ⁡                              (                                  P                  src                                )                                                    V              ⁡                              (                                  P                  ref                                )                                                    ⁢                                  ⁢                  o          =                                    M              ⁡                              (                                  P                  src                                )                                      -                          M              ⁡                              (                                  P                  ref                                )                                                                        (        4        )            